#pragma once
#include "FilerFrogElement.h"

using namespace Gdiplus;

enum RESIZERERROR{
	RESIZERSUCCESS,
	RESIZERFAIL
};

class FileResizer : FilerFrogElement{
private:
	GdiplusStartupInput gdiplusStartupInput;
	ULONG_PTR  gdiplusToken;

	int m_width;
	int m_height;

	int GetEncoderCLSID(const WCHAR* format, CLSID* pClsid);

public:
	FileResizer(HWND parent, int width, int height);
	~FileResizer();

	RESIZERERROR Resize(LPCWSTR sourceFilePath, int quality, const wstring& postfix, bool saveJPG, list<wstring>& newFiles, const wstring& wrapFolder);
};
